//1.登录API POST 可以带{username password}  http://localhost:2703/api/auth/login
import request from "../utils/request";
export const loginApi = ({ username, password }) => {
  return request.post("/auth/login", {
    username,
    password,
  });
};
//退出登录
export const logoutApi = () => request.post("/auth/logout");

//获取用户信息
export const getUserInfoApi = () => request.get("/users/profile");

//上传图片
// new FormData()
// export const uploadApi = (data) => {
//   return request({
//     method: "post",
//     headers: {
//       "Content-Type": "multipart/form-data",
//     },
//     data,
//   });
// };
